<?php
include("mysqlcon.php");
include("ok.php");
include("error.php");
include("userid.php");

   $room_id = $_GET[roomID];
	
	
	  //clear room status
	  $clear_room_status = "UPDATE resort SET `room_status` = '0' WHERE `room_id` = '$room_id'";
	  
	  //update reserv status
	  $update_reserv_status = "UPDATE reservation SET `reserv_status` = '5' WHERE `reserv_id` = '$reserv_id'";



      
      			if(!mysql_query($update_reserv_status,$conn)){
				   error_page("ฐานข้อมูลผิดพลาด $strSQL");
				}
					   	  //add bill
				/*
$save_bill = "INSERT INTO bill(reserv_id,bill_total,bill_cash,bill_change)";
				$save_bill=$save_bill."VALUES('$reserv_id','$overall_price','$cash','$change')";

				if(!mysql_query($save_bill,$conn))error_page("ฐานข้อมูลผิดพลาด $save_bill");
*/
				if(!mysql_query($clear_room_status,$conn)){error_page("ฐานข้อมูลผิดพลาด $clear_room_status");}

/* 				mysql_close($conn); */
	}
?>

